<?php

use think\Route;

/****
 * 用户相关
 */
//用户登录
Route::post('user/login','api/user/login');

//获取用户信息
Route::get('user/getUserInfo','api/user/getUserInfo');

//上传用户头像
Route::post('user/uploadHeadImg','api/user/uploadHeadImg');

//修改用户头像
Route::post('user/updateHeadImg','api/user/updateHeadImg');

//修改用户描述
Route::post('user/updateDescribe','api/user/updateDescribe');

//修改用户昵称
Route::post('user/updateNickName','api/user/updateNickName');

//用户绑定手机号
Route::post('user/bindPhoneNumber','api/user/bindPhoneNumber');

//用户绑定登录密码
Route::post('user/bindPassword','api/user/bindPassword');

//用户手机号密码登录
Route::post("user/LoginByPassword",'api/user/LoginByPassword');

//获取其他用户数据
Route::post('user/getUserInfoById','api/user/getUserInfoById');
/***
 * 收货地址相关
 */
//用户编辑收货地址
Route::post('address/createOrUpdateAddress','api/address/createOrUpdateAddress');

//查询用户收货地址
Route::get('address/getAddress','api/address/getAddress');

/***
 * 商品相关
 */
//上传商品
Route::post('book/uploadBook','api/book/uploadBook');

//上传商品图品
Route::post('book/uploadBookImg','api/book/uploadBookImg');

//查看商品
Route::get('book/viewBookShelf','api/book/viewBookShelf');

//下架商品
Route::post('book/undercarriage','api/book/undercarriage');

//获取书籍详情
Route::post('book/getBookInfo','api/book/getBookInfo');

//修改书籍信息
Route::post('book/editBook','api/book/editBook');

//根据标签获取书籍
Route::post('book/getBookByLabel','api/book/getBookByLabel');

//根据标签获取书籍
Route::get('book/getHotBook','api/book/getHotBook');

//搜索书籍
Route::post('book/searchBook','api/book/searchBook');

//关键字加标签搜索书籍
Route::post('book/searchBookWithLabel','api/book/searchBookWithLabel');

//获取用户已售书籍
Route::post('book/getSoldBook','api/book/getSoldBook');

//根据用户id获取书架
Route::post('book/getBookByUserId','api/book/getBookByUserId');
/***
 * 钱包相关
 */
//查询钱包余额
Route::get('wallet/myWallet','api/wallet/myWallet');

//钱包充值
Route::post('wallet/recharge','api/wallet/recharge');

//钱包提现
Route::post('wallet/withdraw','api/wallet/withdraw');


/***
 * 聊天记录相关
 */
//存储聊天记录
Route::post('communication/saveMessage','api/communication/saveMessage');

//获取聊天记录
Route::post('communication/getMessage','api/communication/getMessage');

//聊天时上传图片
Route::post('communication/uploadCommunicationImg','api/communication/uploadCommunicationImg');

//获取聊天列表
Route::get('communication/getCommunicationList','api/communication/getCommunicationList');

//更新聊天消息状态
Route::post('communication/changeNoRead','api/communication/changeNoRead');

/***
 * 订单相关
 */
//直接购买商品
Route::post('order/purchase','api/order/purchase');

//查询订单
Route::get('order/myOrder','api/order/myOrder');

//查询订单详情
Route::post('order/getOrderByUUID','api/order/getOrderByUUID');

/***
 * 设备相关
 */
//操作书柜
Route::post('device/operateDevice','api/device/operateDevice');

//设置书柜单价
Route::post('device/setPrice','api/device/setPrice');

/***
 * 标签相关
 */
//获取商品分类
Route::get('label/getLabelList','api/label/getLabelList');

/***
 * 评论相关
 */
//获取商品评论
Route::post('comment/getCommentByBookId','api/comment/getCommentByBookId');

//发表评论
Route::post('comment/leaveComment','api/comment/leaveComment');
